3.586 \(\int \frac{\cos ^3(c+d x) (A+C \cos ^2(c+d x))}{(a+b \cos (c+d x))^4} \, dx\)

Optimal. Leaf size=369 \[ -\frac{\left (5 A b^4-C \left (-23 a^2 b^2+12 a^4+6 b^4\right )\right ) \sin (c+d x)}{6 b^4 d \left (a^2-b^2\right )^2}-\frac{\left (a^2 b^6 (3 A+20 C)+28 a^6 b^2 C-35 a^4 b^4 C-8 a^8 C+2 A b^8\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{b^5 d (a-b)^{7/2} (a+b)^{7/2}}-\frac{\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^3(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}+\frac{\left (a^2 b^2 (2 A+9 C)-4 a^4 C+3 A b^4\right ) \sin (c+d x) \cos ^2(c+d x)}{6 b^2 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))^2}+\frac{a \left (3 a^2 b^4 (A+4 C)-11 a^4 b^2 C+4 a^6 C+2 A b^6\right ) \sin (c+d x)}{2 b^4 d \left (a^2-b^2\right )^3 (a+b \cos (c+d x))}-\frac{4 a C x}{b^5} \]

[Out]

(-4*a*C*x)/b^5 - ((2*A*b^8 - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + a^2*b^6*(3*A + 20*C))*ArcTan[(Sqrt[a - b]
*Tan[(c + d*x)/2])/Sqrt[a + b]])/((a - b)^(7/2)*b^5*(a + b)^(7/2)*d) - ((5*A*b^4 - (12*a^4 - 23*a^2*b^2 + 6*b^
4)*C)*Sin[c + d*x])/(6*b^4*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d
*(a + b*Cos[c + d*x])^3) + ((3*A*b^4 - 4*a^4*C + a^2*b^2*(2*A + 9*C))*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^2*(a^2
 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (a*(2*A*b^6 + 4*a^6*C - 11*a^4*b^2*C + 3*a^2*b^4*(A + 4*C))*Sin[c + d*x]
)/(2*b^4*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 1.57892, antiderivative size = 369, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.212, Rules used = {3048, 3047, 3031, 3023, 2735, 2659, 205} \[ -\frac{\left (5 A b^4-C \left (-23 a^2 b^2+12 a^4+6 b^4\right )\right ) \sin (c+d x)}{6 b^4 d \left (a^2-b^2\right )^2}-\frac{\left (a^2 b^6 (3 A+20 C)+28 a^6 b^2 C-35 a^4 b^4 C-8 a^8 C+2 A b^8\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{b^5 d (a-b)^{7/2} (a+b)^{7/2}}-\frac{\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^3(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}+\frac{\left (a^2 b^2 (2 A+9 C)-4 a^4 C+3 A b^4\right ) \sin (c+d x) \cos ^2(c+d x)}{6 b^2 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))^2}+\frac{a \left (3 a^2 b^4 (A+4 C)-11 a^4 b^2 C+4 a^6 C+2 A b^6\right ) \sin (c+d x)}{2 b^4 d \left (a^2-b^2\right )^3 (a+b \cos (c+d x))}-\frac{4 a C x}{b^5} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^4,x]

[Out]

(-4*a*C*x)/b^5 - ((2*A*b^8 - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + a^2*b^6*(3*A + 20*C))*ArcTan[(Sqrt[a - b]
*Tan[(c + d*x)/2])/Sqrt[a + b]])/((a - b)^(7/2)*b^5*(a + b)^(7/2)*d) - ((5*A*b^4 - (12*a^4 - 23*a^2*b^2 + 6*b^
4)*C)*Sin[c + d*x])/(6*b^4*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d
*(a + b*Cos[c + d*x])^3) + ((3*A*b^4 - 4*a^4*C + a^2*b^2*(2*A + 9*C))*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^2*(a^2
 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (a*(2*A*b^6 + 4*a^6*C - 11*a^4*b^2*C + 3*a^2*b^4*(A + 4*C))*Sin[c + d*x]
)/(2*b^4*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))

Rule 3048

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*s
in[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((c^2*C + A*d^2)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[
e + f*x])^(n + 1))/(d*f*(n + 1)*(c^2 - d^2)), x] + Dist[1/(d*(n + 1)*(c^2 - d^2)), Int[(a + b*Sin[e + f*x])^(m
 - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A*d*(b*d*m + a*c*(n + 1)) + c*C*(b*c*m + a*d*(n + 1)) - (A*d*(a*d*(n +
 2) - b*c*(n + 1)) - C*(b*c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x] - b*(A*d^2*(m + n + 2) + C*(c^2*(
m + 1) + d^2*(n + 1)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C}, x] && NeQ[b*c - a*d, 0] &
& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]

Rule 3047

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((c^2*C - B*c*d + A*d^2)*Cos[e +
 f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(n + 1)*(c^2 - d^2)), x] + Dist[1/(d*(n + 1)*(
c^2 - d^2)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A*d*(b*d*m + a*c*(n + 1)) + (c
*C - B*d)*(b*c*m + a*d*(n + 1)) - (d*(A*(a*d*(n + 2) - b*c*(n + 1)) + B*(b*d*(n + 1) - a*c*(n + 2))) - C*(b*c*
d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x] + b*(d*(B*c - A*d)*(m + n + 2) - C*(c^2*(m + 1) + d^2*(n + 1)
))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2,
0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]

Rule 3031

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e
_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((b*c - a*d)*(A*b^2 - a*b*B + a^2*C)*
Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b^2*f*(m + 1)*(a^2 - b^2)), x] - Dist[1/(b^2*(m + 1)*(a^2 - b^2)),
 Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d + b
^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1))))*Sin[e + f*x] - b*C*d*(m +
 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && Ne
Q[a^2 - b^2, 0] && LtQ[m, -1]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cos ^3(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx &=-\frac{\left (A b^2+a^2 C\right ) \cos ^3(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}-\frac{\int \frac{\cos ^2(c+d x) \left (3 \left (A b^2+a^2 C\right )-3 a b (A+C) \cos (c+d x)-\left (A b^2+4 a^2 C-3 b^2 C\right ) \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx}{3 b \left (a^2-b^2\right )}\\ &=-\frac{\left (A b^2+a^2 C\right ) \cos ^3(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac{\left (3 A b^4-4 a^4 C+a^2 b^2 (2 A+9 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}+\frac{\int \frac{\cos (c+d x) \left (2 \left (3 A b^4-4 a^4 C+a^2 b^2 (2 A+9 C)\right )-2 a b \left (5 A b^2-\left (a^2-6 b^2\right ) C\right ) \cos (c+d x)-\left (5 A b^4-\left (12 a^4-23 a^2 b^2+6 b^4\right ) C\right ) \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^2} \, dx}{6 b^2 \left (a^2-b^2\right )^2}\\ &=-\frac{\left (A b^2+a^2 C\right ) \cos ^3(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac{\left (3 A b^4-4 a^4 C+a^2 b^2 (2 A+9 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}+\frac{a \left (2 A b^6+4 a^6 C-11 a^4 b^2 C+3 a^2 b^4 (A+4 C)\right ) \sin (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}+\frac{\int \frac{-3 b \left (2 A b^6+4 a^6 C-11 a^4 b^2 C+3 a^2 b^4 (A+4 C)\right )-a \left (a^2-b^2\right ) \left (5 A b^4+12 a^4 C-25 a^2 b^2 C+18 b^4 C\right ) \cos (c+d x)-b \left (a^2-b^2\right ) \left (5 A b^4-12 a^4 C+23 a^2 b^2 C-6 b^4 C\right ) \cos ^2(c+d x)}{a+b \cos (c+d x)} \, dx}{6 b^4 \left (a^2-b^2\right )^3}\\ &=-\frac{\left (5 A b^4-\left (12 a^4-23 a^2 b^2+6 b^4\right ) C\right ) \sin (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac{\left (A b^2+a^2 C\right ) \cos ^3(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac{\left (3 A b^4-4 a^4 C+a^2 b^2 (2 A+9 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}+\frac{a \left (2 A b^6+4 a^6 C-11 a^4 b^2 C+3 a^2 b^4 (A+4 C)\right ) \sin (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}+\frac{\int \frac{-3 b^2 \left (2 A b^6+4 a^6 C-11 a^4 b^2 C+3 a^2 b^4 (A+4 C)\right )-24 a b \left (a^2-b^2\right )^3 C \cos (c+d x)}{a+b \cos (c+d x)} \, dx}{6 b^5 \left (a^2-b^2\right )^3}\\ &=-\frac{4 a C x}{b^5}-\frac{\left (5 A b^4-\left (12 a^4-23 a^2 b^2+6 b^4\right ) C\right ) \sin (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac{\left (A b^2+a^2 C\right ) \cos ^3(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac{\left (3 A b^4-4 a^4 C+a^2 b^2 (2 A+9 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}+\frac{a \left (2 A b^6+4 a^6 C-11 a^4 b^2 C+3 a^2 b^4 (A+4 C)\right ) \sin (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}-\frac{\left (2 A b^8-8 a^8 C+28 a^6 b^2 C-35 a^4 b^4 C+a^2 b^6 (3 A+20 C)\right ) \int \frac{1}{a+b \cos (c+d x)} \, dx}{2 b^5 \left (a^2-b^2\right )^3}\\ &=-\frac{4 a C x}{b^5}-\frac{\left (5 A b^4-\left (12 a^4-23 a^2 b^2+6 b^4\right ) C\right ) \sin (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac{\left (A b^2+a^2 C\right ) \cos ^3(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac{\left (3 A b^4-4 a^4 C+a^2 b^2 (2 A+9 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}+\frac{a \left (2 A b^6+4 a^6 C-11 a^4 b^2 C+3 a^2 b^4 (A+4 C)\right ) \sin (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}-\frac{\left (2 A b^8-8 a^8 C+28 a^6 b^2 C-35 a^4 b^4 C+a^2 b^6 (3 A+20 C)\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{b^5 \left (a^2-b^2\right )^3 d}\\ &=-\frac{4 a C x}{b^5}-\frac{\left (3 a^2 A b^6+2 A b^8-8 a^8 C+28 a^6 b^2 C-35 a^4 b^4 C+20 a^2 b^6 C\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{(a-b)^{7/2} b^5 (a+b)^{7/2} d}-\frac{\left (5 A b^4-\left (12 a^4-23 a^2 b^2+6 b^4\right ) C\right ) \sin (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac{\left (A b^2+a^2 C\right ) \cos ^3(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac{\left (3 A b^4-4 a^4 C+a^2 b^2 (2 A+9 C)\right ) \cos ^2(c+d x) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}+\frac{a \left (2 A b^6+4 a^6 C-11 a^4 b^2 C+3 a^2 b^4 (A+4 C)\right ) \sin (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}\\ \end{align*}

Mathematica [B]  time = 4.08161, size = 849, normalized size = 2.3 \[ \frac{\frac{24 \left (8 C a^8-28 b^2 C a^6+35 b^4 C a^4-b^6 (3 A+20 C) a^2-2 A b^8\right ) \tanh ^{-1}\left (\frac{(a-b) \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{b^2-a^2}}\right )}{\left (b^2-a^2\right )^{7/2}}+\frac{-96 c C a^{10}-96 C d x a^{10}+96 b C \sin (c+d x) a^9+144 b^2 c C a^8+144 b^2 C d x a^8+120 b^2 C \sin (2 (c+d x)) a^8-24 b^3 c C \cos (3 (c+d x)) a^7-24 b^3 C d x \cos (3 (c+d x)) a^7-228 b^3 C \sin (c+d x) a^7+44 b^3 C \sin (3 (c+d x)) a^7+144 b^4 c C a^6+144 b^4 C d x a^6-336 b^4 C \sin (2 (c+d x)) a^6+3 b^4 C \sin (4 (c+d x)) a^6+72 b^5 c C \cos (3 (c+d x)) a^5+72 b^5 C d x \cos (3 (c+d x)) a^5+18 A b^5 \sin (c+d x) a^5+135 b^5 C \sin (c+d x) a^5+2 A b^5 \sin (3 (c+d x)) a^5-125 b^5 C \sin (3 (c+d x)) a^5-336 b^6 c C a^4-336 b^6 C d x a^4+6 A b^6 \sin (2 (c+d x)) a^4+300 b^6 C \sin (2 (c+d x)) a^4-9 b^6 C \sin (4 (c+d x)) a^4-72 b^7 c C \cos (3 (c+d x)) a^3-72 b^7 C d x \cos (3 (c+d x)) a^3+39 A b^7 \sin (c+d x) a^3+90 b^7 C \sin (c+d x) a^3-5 A b^7 \sin (3 (c+d x)) a^3+114 b^7 C \sin (3 (c+d x)) a^3+144 b^8 c C a^2+144 b^8 C d x a^2-144 b^2 \left (a^2-b^2\right )^3 C (c+d x) \cos (2 (c+d x)) a^2+54 A b^8 \sin (2 (c+d x)) a^2-18 b^8 C \sin (2 (c+d x)) a^2+9 b^8 C \sin (4 (c+d x)) a^2-72 b \left (a^2-b^2\right )^3 \left (4 a^2+b^2\right ) C (c+d x) \cos (c+d x) a+24 b^9 c C \cos (3 (c+d x)) a+24 b^9 C d x \cos (3 (c+d x)) a+18 A b^9 \sin (c+d x) a-18 b^9 C \sin (c+d x) a+18 A b^9 \sin (3 (c+d x)) a-18 b^9 C \sin (3 (c+d x)) a-6 b^{10} C \sin (2 (c+d x))-3 b^{10} C \sin (4 (c+d x))}{\left (a^2-b^2\right )^3 (a+b \cos (c+d x))^3}}{24 b^5 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^4,x]

[Out]

((24*(-2*A*b^8 + 8*a^8*C - 28*a^6*b^2*C + 35*a^4*b^4*C - a^2*b^6*(3*A + 20*C))*ArcTanh[((a - b)*Tan[(c + d*x)/
2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(7/2) + (-96*a^10*c*C + 144*a^8*b^2*c*C + 144*a^6*b^4*c*C - 336*a^4*b^6*c*
C + 144*a^2*b^8*c*C - 96*a^10*C*d*x + 144*a^8*b^2*C*d*x + 144*a^6*b^4*C*d*x - 336*a^4*b^6*C*d*x + 144*a^2*b^8*
C*d*x - 72*a*b*(a^2 - b^2)^3*(4*a^2 + b^2)*C*(c + d*x)*Cos[c + d*x] - 144*a^2*b^2*(a^2 - b^2)^3*C*(c + d*x)*Co
s[2*(c + d*x)] - 24*a^7*b^3*c*C*Cos[3*(c + d*x)] + 72*a^5*b^5*c*C*Cos[3*(c + d*x)] - 72*a^3*b^7*c*C*Cos[3*(c +
 d*x)] + 24*a*b^9*c*C*Cos[3*(c + d*x)] - 24*a^7*b^3*C*d*x*Cos[3*(c + d*x)] + 72*a^5*b^5*C*d*x*Cos[3*(c + d*x)]
 - 72*a^3*b^7*C*d*x*Cos[3*(c + d*x)] + 24*a*b^9*C*d*x*Cos[3*(c + d*x)] + 18*a^5*A*b^5*Sin[c + d*x] + 39*a^3*A*
b^7*Sin[c + d*x] + 18*a*A*b^9*Sin[c + d*x] + 96*a^9*b*C*Sin[c + d*x] - 228*a^7*b^3*C*Sin[c + d*x] + 135*a^5*b^
5*C*Sin[c + d*x] + 90*a^3*b^7*C*Sin[c + d*x] - 18*a*b^9*C*Sin[c + d*x] + 6*a^4*A*b^6*Sin[2*(c + d*x)] + 54*a^2
*A*b^8*Sin[2*(c + d*x)] + 120*a^8*b^2*C*Sin[2*(c + d*x)] - 336*a^6*b^4*C*Sin[2*(c + d*x)] + 300*a^4*b^6*C*Sin[
2*(c + d*x)] - 18*a^2*b^8*C*Sin[2*(c + d*x)] - 6*b^10*C*Sin[2*(c + d*x)] + 2*a^5*A*b^5*Sin[3*(c + d*x)] - 5*a^
3*A*b^7*Sin[3*(c + d*x)] + 18*a*A*b^9*Sin[3*(c + d*x)] + 44*a^7*b^3*C*Sin[3*(c + d*x)] - 125*a^5*b^5*C*Sin[3*(
c + d*x)] + 114*a^3*b^7*C*Sin[3*(c + d*x)] - 18*a*b^9*C*Sin[3*(c + d*x)] + 3*a^6*b^4*C*Sin[4*(c + d*x)] - 9*a^
4*b^6*C*Sin[4*(c + d*x)] + 9*a^2*b^8*C*Sin[4*(c + d*x)] - 3*b^10*C*Sin[4*(c + d*x)])/((a^2 - b^2)^3*(a + b*Cos
[c + d*x])^3))/(24*b^5*d)

________________________________________________________________________________________

Maple [B]  time = 0.049, size = 2199, normalized size = 6. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(A+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^4,x)

[Out]

6/d*b^2/(a*tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3*a/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/
2*c)*A+12/d/b^4/(a*tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3*a^7/(a^2+2*a*b+b^2)/(a^2-2*a*b+b^2)*tan(
1/2*d*x+1/2*c)^3*C+12/d*b^2/(a*tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3*a/(a^2+2*a*b+b^2)/(a^2-2*a*b
+b^2)*tan(1/2*d*x+1/2*c)^3*A+6/d*b^2/(a*tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3*a/(a-b)/(a^3+3*a^2*
b+3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5*A-116/3/d/b^2/(a*tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3*a^5/(a
^2+2*a*b+b^2)/(a^2-2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3*C-2/d*b^3/(a^6-3*a^4*b^2+3*a^2*b^4-b^6)/((a+b)*(a-b))^(1/2)
*arctan((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2))*A+2/d*C/b^4*tan(1/2*d*x+1/2*c)/(tan(1/2*d*x+1/2*c)^2+1)-
8/d*C/b^5*a*arctan(tan(1/2*d*x+1/2*c))+20/d/(a*tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3*a^3/(a+b)/(a
^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c)*C-20/d*b/(a^6-3*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(a*tan(1/2*d*x+1/2
*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3/(a-b)/(a^3+3*a^2*b+3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5*C-5/d*a^4/b/(a*tan(1/
2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)^3/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c)*C

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(A+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^4,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 3.89175, size = 4302, normalized size = 11.66 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(A+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^4,x, algorithm="fricas")

[Out]

[-1/12*(48*(C*a^9*b^3 - 4*C*a^7*b^5 + 6*C*a^5*b^7 - 4*C*a^3*b^9 + C*a*b^11)*d*x*cos(d*x + c)^3 + 144*(C*a^10*b
^2 - 4*C*a^8*b^4 + 6*C*a^6*b^6 - 4*C*a^4*b^8 + C*a^2*b^10)*d*x*cos(d*x + c)^2 + 144*(C*a^11*b - 4*C*a^9*b^3 +
6*C*a^7*b^5 - 4*C*a^5*b^7 + C*a^3*b^9)*d*x*cos(d*x + c) + 48*(C*a^12 - 4*C*a^10*b^2 + 6*C*a^8*b^4 - 4*C*a^6*b^
6 + C*a^4*b^8)*d*x + 3*(8*C*a^11 - 28*C*a^9*b^2 + 35*C*a^7*b^4 - (3*A + 20*C)*a^5*b^6 - 2*A*a^3*b^8 + (8*C*a^8
*b^3 - 28*C*a^6*b^5 + 35*C*a^4*b^7 - (3*A + 20*C)*a^2*b^9 - 2*A*b^11)*cos(d*x + c)^3 + 3*(8*C*a^9*b^2 - 28*C*a
^7*b^4 + 35*C*a^5*b^6 - (3*A + 20*C)*a^3*b^8 - 2*A*a*b^10)*cos(d*x + c)^2 + 3*(8*C*a^10*b - 28*C*a^8*b^3 + 35*
C*a^6*b^5 - (3*A + 20*C)*a^4*b^7 - 2*A*a^2*b^9)*cos(d*x + c))*sqrt(-a^2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^
2 - b^2)*cos(d*x + c)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c) - a^2 + 2*b^2)/(b^2*cos(d*x + c
)^2 + 2*a*b*cos(d*x + c) + a^2)) - 2*(24*C*a^11*b - 92*C*a^9*b^3 + (4*A + 133*C)*a^7*b^5 + (7*A - 71*C)*a^5*b^
7 - (11*A - 6*C)*a^3*b^9 + 6*(C*a^8*b^4 - 4*C*a^6*b^6 + 6*C*a^4*b^8 - 4*C*a^2*b^10 + C*b^12)*cos(d*x + c)^3 +
(44*C*a^9*b^3 + (2*A - 169*C)*a^7*b^5 - (7*A - 239*C)*a^5*b^7 + (23*A - 132*C)*a^3*b^9 - 18*(A - C)*a*b^11)*co
s(d*x + c)^2 + 3*(20*C*a^10*b^2 - 77*C*a^8*b^4 + (A + 110*C)*a^6*b^6 + (8*A - 59*C)*a^4*b^8 - 3*(3*A - 2*C)*a^
2*b^10)*cos(d*x + c))*sin(d*x + c))/((a^8*b^8 - 4*a^6*b^10 + 6*a^4*b^12 - 4*a^2*b^14 + b^16)*d*cos(d*x + c)^3
+ 3*(a^9*b^7 - 4*a^7*b^9 + 6*a^5*b^11 - 4*a^3*b^13 + a*b^15)*d*cos(d*x + c)^2 + 3*(a^10*b^6 - 4*a^8*b^8 + 6*a^
6*b^10 - 4*a^4*b^12 + a^2*b^14)*d*cos(d*x + c) + (a^11*b^5 - 4*a^9*b^7 + 6*a^7*b^9 - 4*a^5*b^11 + a^3*b^13)*d)
, -1/6*(24*(C*a^9*b^3 - 4*C*a^7*b^5 + 6*C*a^5*b^7 - 4*C*a^3*b^9 + C*a*b^11)*d*x*cos(d*x + c)^3 + 72*(C*a^10*b^
2 - 4*C*a^8*b^4 + 6*C*a^6*b^6 - 4*C*a^4*b^8 + C*a^2*b^10)*d*x*cos(d*x + c)^2 + 72*(C*a^11*b - 4*C*a^9*b^3 + 6*
C*a^7*b^5 - 4*C*a^5*b^7 + C*a^3*b^9)*d*x*cos(d*x + c) + 24*(C*a^12 - 4*C*a^10*b^2 + 6*C*a^8*b^4 - 4*C*a^6*b^6
+ C*a^4*b^8)*d*x - 3*(8*C*a^11 - 28*C*a^9*b^2 + 35*C*a^7*b^4 - (3*A + 20*C)*a^5*b^6 - 2*A*a^3*b^8 + (8*C*a^8*b
^3 - 28*C*a^6*b^5 + 35*C*a^4*b^7 - (3*A + 20*C)*a^2*b^9 - 2*A*b^11)*cos(d*x + c)^3 + 3*(8*C*a^9*b^2 - 28*C*a^7
*b^4 + 35*C*a^5*b^6 - (3*A + 20*C)*a^3*b^8 - 2*A*a*b^10)*cos(d*x + c)^2 + 3*(8*C*a^10*b - 28*C*a^8*b^3 + 35*C*
a^6*b^5 - (3*A + 20*C)*a^4*b^7 - 2*A*a^2*b^9)*cos(d*x + c))*sqrt(a^2 - b^2)*arctan(-(a*cos(d*x + c) + b)/(sqrt
(a^2 - b^2)*sin(d*x + c))) - (24*C*a^11*b - 92*C*a^9*b^3 + (4*A + 133*C)*a^7*b^5 + (7*A - 71*C)*a^5*b^7 - (11*
A - 6*C)*a^3*b^9 + 6*(C*a^8*b^4 - 4*C*a^6*b^6 + 6*C*a^4*b^8 - 4*C*a^2*b^10 + C*b^12)*cos(d*x + c)^3 + (44*C*a^
9*b^3 + (2*A - 169*C)*a^7*b^5 - (7*A - 239*C)*a^5*b^7 + (23*A - 132*C)*a^3*b^9 - 18*(A - C)*a*b^11)*cos(d*x +
c)^2 + 3*(20*C*a^10*b^2 - 77*C*a^8*b^4 + (A + 110*C)*a^6*b^6 + (8*A - 59*C)*a^4*b^8 - 3*(3*A - 2*C)*a^2*b^10)*
cos(d*x + c))*sin(d*x + c))/((a^8*b^8 - 4*a^6*b^10 + 6*a^4*b^12 - 4*a^2*b^14 + b^16)*d*cos(d*x + c)^3 + 3*(a^9
*b^7 - 4*a^7*b^9 + 6*a^5*b^11 - 4*a^3*b^13 + a*b^15)*d*cos(d*x + c)^2 + 3*(a^10*b^6 - 4*a^8*b^8 + 6*a^6*b^10 -
 4*a^4*b^12 + a^2*b^14)*d*cos(d*x + c) + (a^11*b^5 - 4*a^9*b^7 + 6*a^7*b^9 - 4*a^5*b^11 + a^3*b^13)*d)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(A+C*cos(d*x+c)**2)/(a+b*cos(d*x+c))**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.84877, size = 1142, normalized size = 3.09 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(A+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^4,x, algorithm="giac")

[Out]

-1/3*(3*(8*C*a^8 - 28*C*a^6*b^2 + 35*C*a^4*b^4 - 3*A*a^2*b^6 - 20*C*a^2*b^6 - 2*A*b^8)*(pi*floor(1/2*(d*x + c)
/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^6
*b^5 - 3*a^4*b^7 + 3*a^2*b^9 - b^11)*sqrt(a^2 - b^2)) + 12*(d*x + c)*C*a/b^5 - (18*C*a^9*tan(1/2*d*x + 1/2*c)^
5 - 42*C*a^8*b*tan(1/2*d*x + 1/2*c)^5 - 24*C*a^7*b^2*tan(1/2*d*x + 1/2*c)^5 + 117*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+ b)^3) -
6*C*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 + 1)*b^4))/d